<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script type="text/javascript" src="./index.js"></script>
	<script>
		// alert(2);
		var a = 5;
		
		//var x = a++; 先将a的值赋值给x，x输出5，再对a++ a就是6
		// var x = a++;
		// console.log(a); //6
		// console.log(x); //5

	    var x = ++a;
	    // 先a++,再赋值
	    console.log(a); //6
	    console.log(x); //6




	</script>
	
</body>
</html>